//
//  BusAltShiftCell.swift
//  SwiftTestDemo
//
//  Created by John on 2018/5/22.
//  Copyright © 2018年 company. All rights reserved.
//

import UIKit

protocol BusAltShiftCellDelegate:NSObjectProtocol {
    
    func refreshOpenAltShiftStatus(bOpenAltShift:Bool)
    
}

class BusAltShiftCell: UITableViewCell {
    
    weak var delegate:BusAltShiftCellDelegate?
    
    @IBOutlet weak var vFilletBackView: UIView!
    @IBOutlet weak var lblAltShiftTitle: UILabel!
    @IBOutlet weak var lblAltShiftDesc: UILabel!
    @IBOutlet weak var switchAltShift: UISwitch!
    @IBAction func didPressedSwitchAltShift(_ sender: UISwitch) {
        
        if delegate != nil {
            delegate?.refreshOpenAltShiftStatus(bOpenAltShift: self.switchAltShift.isOn)
        }
        
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        self.lblAltShiftDesc.textColor = def_color_Secondary
        self.vFilletBackView.layer.masksToBounds = true
        self.vFilletBackView.layer.cornerRadius = 4
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
